home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
awe2-0_1.lha
/
awe2-0.1
/
Src
/
RCS
/
SpinEvent.cc,v
< prev
next >
Wrap
Text File
|
1989-05-09
|
1KB
|
111 lines
head 3.2;
branch ;
access ;
symbols ;
locks grunwald:3.2; strict;
comment @@;
3.2
date 89.02.20.15.37.34; author grunwald; state Exp;
branches ;
next 3.1;
3.1
date 88.12.20.13.49.18; author grunwald; state Exp;
branches ;
next 1.2;
1.2
date 88.10.30.13.04.39; author grunwald; state Exp;
branches ;
next 1.1;
1.1
date 88.09.28.22.13.23; author grunwald; state Exp;
branches ;
next ;
desc
@@
3.2
log
@Start using Gnu library heaps for schedulers
@
text
@// This may look like C code, but it is really -*- C++ -*-
//
// Copyright (C) 1988 University of Illinois, Urbana, Illinois
//
// written by Dirk Grunwald (grunwald@@cs.uiuc.edu)
//
#include "SpinEvent.h"
#include "Pragma.h"
PRAGMA_LINKAGE_C
extern int getpid();
PRAGMA_LINKAGE
void
SpinEvent::waitFor()
{
int timesAround = 0;
reserve();
int gen = generation;
garcon++;
release();
//
// Waiting people just read generation, and the final process
// just writes it, so we do not really even need to use the locks here.
//
while ( gen == generation ) {
if (timesAround > pLoops) {
(void) getpid();
timesAround = 0;
}
timesAround++;
}
}
@
3.1
log
@Steay version
@
text
@@
1.2
log
@*** empty log message ***
@
text
@d8 1
d10 1
d12 1
a12 1
@
1.1
log
@Initial revision
@
text
@d1 7
a7 1
#include "HardEvent.h"
d13 1
a13 1
HardEvent::waitFor()
@